package com.minelx.datamicroscope.querylanguage.data;

import com.alibaba.fastjson.JSONObject;
import com.minelx.datamicroscope.querylanguage.data.Condition;

import static java.util.Collections.singletonMap;

class ContentCondition implements Condition {

	private final String contentAsText;

	ContentCondition(String contentAsText) {
		this.contentAsText = contentAsText;
	}

	@Override
	public JSONObject toJSON() {
		return new JSONObject(singletonMap("content", contentAsText));
	}
}
